-
Notifications
You must be signed in to change notification settings - Fork 498
[FLINK-36473] Wait for metrics before asserting on them #896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
aplyusnin
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, I prefer your changes over mine. I will close my pr after your pr is merged
kornys
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
flink-autoscaler/src/test/java/org/apache/flink/autoscaler/RestApiMetricsCollectorTest.java
Outdated
Show resolved
Hide resolved
tomncooper
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just a couple of small questions.
What is the purpose of the change
Operator metrics are lazily initialised. This PR addresses race conditions in tests trying to assert metrics.
An alternative to the
Thread.sleepproposed in #891Brief change log
Wait for metrics to be initialised in integration tests.
Verifying this change
This change is already covered by existing tests, such as (please describe tests).
This change is purely a fix to
RestApiMetricsCollectorTest&KubernetesClientMetricsTestDoes this pull request potentially affect one of the following parts:
CustomResourceDescriptors: noDocumentation